package rpc;

import java.io.Serializable;

import session.Session;

@SuppressWarnings("serial")
public class RPCPacket implements Serializable {
	
	private String callId;
	private boolean ack; //set to true once sending a reply
	private short opCode;
	private int sessVersion; // used for Read session calls
	private String sessId; // used for read session calls
	private Session sessionData; //used to write a whole session 
	private int rpcPort;

	/**
	 * @return the rpcPort
	 */
	public int getRpcPort() {
		return rpcPort;
	}

	/**
	 * @param rpcPort the rpcPort to set
	 */
	public void setRpcPort(int rpcPort) {
		this.rpcPort = rpcPort;
	}

	public RPCPacket(String callId) {
		this.callId = callId;
	}

	/**
	 * @return the callId
	 */
	public String getCallId() {
		return callId;
	}

	/**
	 * @param callId the callId to set
	 */
	public void setCallId(String callId) {
		this.callId = callId;
	}

	/**
	 * @return the opCode
	 */
	public short getOpCode() {
		return opCode;
	}

	/**
	 * @param opCode the opCode to set
	 */
	public void setOpCode(short opCode) {
		this.opCode = opCode;
	}

	/**
	 * @return the sessVersion
	 */
	public int getSessVersion() {
		return sessVersion;
	}

	/**
	 * @param sessVersion the sessVersion to set
	 */
	public void setSessVersion(int sessVersion) {
		this.sessVersion = sessVersion;
	}

	/**
	 * @return the sessionData
	 */
	public Session getSessionData() {
		return sessionData;
	}

	/**
	 * @param sessionData the sessionData to set
	 */
	public void setSessionData(Session sessionData) {
		this.sessionData = sessionData;
	}

	public String getSessId() {
		return sessId;
	}

	public void setSessId(String sessId) {
		this.sessId = sessId;
	}

	public boolean isAck() {
		return ack;
	}

	public void setAck(boolean ack) {
		this.ack = ack;
	}
	
	
	
	
}
